package ${package.Conver};


import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
import com.xiao.hao.config.LocalDateTimeConfig;
import ${package.Entityinsert}.${entity}InsertReq;
import ${package.Entitypagereq}.${entity}QueryPageReq;
import ${package.Entityupdate}.${entity}UpdateReq;
import ${package.Entityresp}.${entity}Resp;
import ${package.Entity}.${entity};

/**
*
*
* @Description ${table.comment!} 类型转换
* @Author ${author}
* @Date ${date}
*/
@Mapper(uses = {LocalDateTimeConfig.class}, componentModel = "spring")
public interface ${entity}Convertor {

    ${entity}Convertor INSTANCE = Mappers.getMapper(${entity}Convertor.class);

    /**
    * 功能描述:
    *
    * @param req
    * @return ${package.Entity}.${entity}
    * @author ${author}
    * @date ${date}
    */
    ${entity} reqToEntity(${entity}InsertReq req);

    /**
    * 功能描述:
    *
    * @param req
    * @return ${package.Entity}.${entity}
    * @author ${author}
    * @date ${date}
    */
    ${entity} reqToEntity(${entity}UpdateReq req);


    /**
    * 功能描述:
    *
    * @param entity
    * @return ${package.Entityresp}.${entity}Resp
    * @author ${author}
    * @date ${date}
    */
    ${entity}Resp entityToResp(${entity} entity);

    /**
    * 功能描述:
    *
    * @param list
    * @return java.util.List<${package.Entityresp}.${entity}Resp>
    * @author ${author}
    * @date ${date}
    */
    List<${entity}Resp> entityListToRespList(List<${entity}> list);
}



<#--/**-->
<#-- * <p>-->
<#-- * ${table.comment!} 服务实现类-->
<#-- * </p>-->
<#-- *-->
<#-- * @author ${author}-->
<#-- * @since ${date}-->
<#-- */-->
<#--@Service-->
<#--<#if kotlin>-->
<#--open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {-->

<#--}-->
<#--<#else>-->
<#--public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {-->

<#--}-->
<#--</#if>-->
